package com.example.demo1.basic;

import android.util.Log;

public class TestInnerClass {

    private int number = 100;
    public class Inner {
        private int number = 200;
        public void paint() {
            int number = 500;
            //局部覆盖  打印的为500
            Log.i("TestInnerClass","number: " + number);
            //this.number引用的是内部类的成员属性 打印的为200
            Log.i("TestInnerClass", "this.number" + this.number);
            Log.i("TestInnerClass", "this.number" + TestInnerClass.this.number);//打印的为100
        }
    }
}
